package com.edu.dreams.mapper;

import com.edu.dreams.entity.News;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface NewsMapper {
	int addNews(@Param("news") News news);

	News getNewsById(@Param("id") int id);

	List<News> getAllNews();

	int deleteNews(@Param("id") int id);

	int updateNews(@Param("news") News news);

	List<News> searchNews(@Param("aname") String aname);
}
